#include "LevelInfo.h"
#include "cocos2d.h"
#include "../Support/GameSupport.h"
#define kPlayerLevelEnable "_level_enable_"
USING_NS_CC;

LevelInfo::LevelInfo()
{

}

bool LevelInfo::getLevelEnable(EGameMode mode, int id)
{
	return UserDefault::getInstance()->getBoolForKey(String::createWithFormat("%s%s%d", GameSupport::getTextMode(mode), 
		kPlayerLevelEnable, id)->getCString());
}

void LevelInfo::setLevelEnable(EGameMode mode, int id, bool enable)
{
	UserDefault::getInstance()->setBoolForKey(String::createWithFormat("%s%s%d", GameSupport::getTextMode(mode), 
		kPlayerLevelEnable, id)->getCString(), enable);
}